package czx.wt.system.pojo;

import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @program: spring-jwt
 * @description: 权限实体类
 * @author: ChenZhiXiang
 * @create: 2019-06-19 11:13
 **/
@TableName("sys_authorities")
@Data
@Alias("authorities")
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "权限对象")
public class Authorities implements Serializable {

    private static final long serialVersionUID = -7322025657329547747L;

    @TableId(type = IdType.INPUT)
    @NotBlank(message = "权限不能为空")
    @ApiModelProperty(value = "权限",example = "")
    private String authority;

    @NotBlank(message = "权限名不能为空")
    @ApiModelProperty(value = "权限中文名",example = "")
    private String authorityName;

    @ApiModelProperty(value = "模块名",example = "用户管理模块")
    private String parentName;

    @ApiModelProperty(value = "顺序",example = "2")
    private Integer sort;

    @ApiModelProperty(value = "创建时间",example = "")
    private Date createTime;

}
